module.exports = function (code, msg, data = null) {
  return {
    code,
    msg,
    data: code === 0 ? data : undefined
  }
}
